package com.lzy.websocket.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.lzy.websocket.bean.Message;

@Mapper
public interface MessageMapper {
	
	/**
	 * 获取两个用户之间所有的消息
	 * @param userName1
	 * @param userName2
	 * @return
	 */
	public List<Message> listMessages(@Param("userName1")String userName1,@Param("userName2")String userName2);
	
	/**
	 * 向数据库中插入一条新
	 * @param message
	 */
	public void insertMessage(Message message);
}
